import numpy as np
a = np.zeros(101)
a_temp = np.zeros(101)
for name in range(27,101):
    f = open("/home/xjp/Geant4/geant4_work/B1/get/"+str(name)+".txt","r+")
    while(1):
        line = f.readline()
        if not line:
            break
        N = line.split(" ")
        a[name] += float(N[1])
    a[name] = a[name]/10000
    print(a[name])
for name in range(27,101):
    f = open("/home/xjp/Geant4/geant4_work/B1/get/"+str(name)+".txt","r+")
    while(1):
        line = f.readline()
        if not line:
            break
        N = line.split(" ")
        a_temp[name] += float(N[1])
        if(a_temp[name]>=a[name]*9900):
            a_temp[name] = float(N[0])
            break
for name in range(27,101):
    print(a_temp[name]/1000*5,"cm")
